package org.gary.admin.service;

import org.gary.admin.model.Administrator;
import org.gary.core.factories.BasicServiceFactory;

/**
 * Administrator的Service接口
 * @author Administrator
 * 
 */
public interface AdministratorService extends
		BasicServiceFactory<Administrator> {
	
	/**
	 * 登录
	 * @param username
	 * @param password
	 * @return
	 */
	public String login(String username, String password);

	/**
	 * 通过username加载一个Administrator放到session中
	 * @param username
	 * @return
	 */
	public Administrator loadByUsername(String username);

	/**
	 * 检查username在数据库中是否存在
	 * @param username
	 * @return
	 */
	public boolean checkUsernameExist(String username);
}
